{#**
 * 2007-2020 PrestaShop SA and Contributors
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2020 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *#}

{% block employee_options_form %}
  {{ form_start(employeeOptionsForm, {'action': path('admin_employees_save_options') }) }}
  <div class="card">
    <h3 class="card-header">
      <i class="material-icons">settings</i>
      {{ 'Employee options'|trans({}, 'Admin.Advparameters.Feature') }}
    </h3>
    <div class="card-block row">
      <div class="card-text">
        <div class="form-group row">
          <label for="{{ employeeOptionsForm.options.password_change_time.vars.id }}" class="form-control-label">
            {{ 'Password regeneration'|trans({}, 'Admin.Advparameters.Feature') }}
          </label>

          <div class="col-sm">
            {{ form_errors(employeeOptionsForm.options.password_change_time) }}
            {{ form_widget(employeeOptionsForm.options.password_change_time) }}
            <small class="form-text">
              {{ 'Security: Minimum time to wait between two password changes.'|trans({}, 'Admin.Advparameters.Feature') }}
            </small>

            {% if not canOptionsBeChanged %}
            <div class="alert alert-warning mt-2 mb-0" role="alert">
              <p class="alert-text">
                {{ 'You can\'t change the value of this configuration field in the context of this shop.'|trans({}, 'Admin.Notifications.Warning') }}
              </p>
            </div>
            {% endif %}
          </div>
        </div>

        <div class="form-group row">
          <label for="{{ employeeOptionsForm.options.allow_employee_specific_language.vars.id }}" class="form-control-label">
            {{ 'Memorize the language used in Admin panel forms'|trans({}, 'Admin.Advparameters.Feature') }}
          </label>

          <div class="col-sm">
            {{ form_errors(employeeOptionsForm.options.allow_employee_specific_language) }}
            {{ form_widget(employeeOptionsForm.options.allow_employee_specific_language) }}
            <small class="form-text">
              {{ 'Allow employees to select a specific language for the Admin panel form.'|trans({}, 'Admin.Advparameters.Feature') }}
            </small>

            {% if not canOptionsBeChanged %}
            <div class="alert alert-warning mt-2 mb-0" role="alert">
              <p class="alert-text">
                {{ 'You can\'t change the value of this configuration field in the context of this shop.'|trans({}, 'Admin.Notifications.Warning') }}
              </p>
            </div>
            {% endif %}
          </div>
        </div>

        {% block employee_options_form_rest %}
          {{ form_rest(employeeOptionsForm) }}
        {% endblock %}
      </div>
    </div>
    <div class="card-footer">
      <div class="d-flex justify-content-end">
        <button class="btn btn-primary pull-right"
                {% if not canOptionsBeChanged %}disabled{% endif %}
        >
          {{ 'Save'|trans({}, 'Admin.Actions') }}
        </button>
      </div>
    </div>
  </div>
  {{ form_end(employeeOptionsForm) }}
{% endblock %}
